package com.otitan.la.forest.industry.entity;

import cn.afterturn.easypoi.excel.annotation.Excel;
import cn.afterturn.easypoi.handler.inter.IExcelDataModel;
import cn.afterturn.easypoi.handler.inter.IExcelModel;
import com.baomidou.mybatisplus.annotation.TableField;
import io.swagger.annotations.ApiModelProperty;
import lombok.AllArgsConstructor;
import lombok.Data;
import lombok.NoArgsConstructor;
import org.hibernate.validator.constraints.Length;

import javax.validation.constraints.NotBlank;
import javax.validation.constraints.Pattern;
import java.math.BigDecimal;
import java.util.Date;

/**
 * @Description:    龙头企业导入对象实体类
 * @Author:        Sunke
 * @CreateDate:     2020/10/20 0020 10:45
 * @UpdateUser:     Sunke
 * @UpdateDate:     2020/10/20 0020 10:45
 * @UpdateRemark:   修改内容
 * @Version:        1.0
 */
@Data
@AllArgsConstructor
@NoArgsConstructor
public class EnterpriseInputEntity implements IExcelDataModel, IExcelModel {

    /**
     * 行号
     */
    private int rowNum;

    /**
     * 错误消息
     */
    private String errorMsg;

    @Excel(name = "企业名称*")
    @NotBlank(message = "[企业名称]不能为空")
    private String name;

    @Excel(name = "统一社会信用代码")
    private String code;

    @Excel(name = "法定代表人*")
    @NotBlank(message = "[法定代表人]不能为空")
    private String legalRepresentative;

    @Excel(name = "法定代表人联系电话")
    private String tel;

    @Excel(name = "地址*")
    @NotBlank(message = "[地址]不能为空")
    private String address;

    @Excel(name = "经度")
    private BigDecimal lon;

    @Excel(name = "纬度")
    private BigDecimal lat;

    @Excel(name = "企业类型*")
    @NotBlank(message = "[企业类型]不能为空")
    private String enterType;

    @Excel(name = "企业性质")
    private String enterNature;

    @Excel(name = "成立时间", format = "yyyy-MM-dd")
    private Date foundDate;

    @Excel(name = "是否龙头企业*", replace = { "是_1", "否_0" })
    @Pattern(regexp = "[01]", message = "是否为龙头企业错误")
    @NotBlank(message = "[是否龙头企业]不能为空")
    private String isLeadingEnterprises;


    @Excel(name = "所在地区*")
    @NotBlank(message = "[所在地区]不能为空")
    private String areaCode;

    @Excel(name = "经营范围")
    private String scopeBusiness;


    @Excel(name = "生产情况")
    private String productStatus;


    @Excel(name = "企业介绍")
    private String remark;

}
